/****************************************************************
 * Fulguro
 * Copyright (C) 2004 Christophe Clienti
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 ***************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __FLGR_MORPHO_BASE_H
#define __FLGR_MORPHO_BASE_H

#include <flgrCoreDll.h>
#include <flgrCoreErrors.h>
#include <flgrCoreTypes.h>
#include <flgrCoreData.h>



/************************************* 1D Functions *************************************************/



  EXPORT_LIB FLGR_Ret flgr1d_minkowski_sub(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_minkowski_add(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_erode(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_dilate(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_median(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB FLGR_Ret flgr1d_gradient_inner(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_gradient_outer(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_gradient_thick(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB FLGR_Ret flgr1d_open(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_close(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB FLGR_Ret flgr1d_open_tophat(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB FLGR_Ret flgr1d_close_tophat(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  

  EXPORT_LIB void flgr1d_minkowski_sub_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_sub_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB void flgr1d_minkowski_add_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_minkowski_add_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB void flgr1d_erode_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_erode_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);

  EXPORT_LIB void flgr1d_dilate_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_dilate_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  
  EXPORT_LIB void flgr1d_median_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);
  EXPORT_LIB void flgr1d_median_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datsrc, FLGR_Data1D *nhb);








  /************************************* 2D Functions *************************************************/






  EXPORT_LIB FLGR_Ret flgr2d_minkowski_sub(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_minkowski_add(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_erode(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_dilate(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_median(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB FLGR_Ret flgr2d_gradient_inner(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_gradient_outer(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_gradient_thick(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB FLGR_Ret flgr2d_open(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_close(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB FLGR_Ret flgr2d_open_tophat(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB FLGR_Ret flgr2d_close_tophat(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  

  EXPORT_LIB void flgr2d_minkowski_sub_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_sub_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB void flgr2d_minkowski_add_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_minkowski_add_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB void flgr2d_erode_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_erode_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);

  EXPORT_LIB void flgr2d_dilate_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_dilate_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  
  EXPORT_LIB void flgr2d_median_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);
  EXPORT_LIB void flgr2d_median_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc, FLGR_Data2D *nhb);




#endif

#ifdef __cplusplus
}
#endif
